/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * kj_cityEntity
 * @author hzy
 * @version 2021-07-06
 */
@Table(name="kj_city", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="城市名", queryType=QueryType.LIKE),
		@Column(name="zindex", attrName="zindex", label="排序", isQuery = false),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.zindex desc, a.update_date DESC"
)
public class KjCity extends DataEntity<KjCity> {

	private static final long serialVersionUID = 1L;
	private String name;		// 城市名
	private int zindex;

	public KjCity() {
		this(null);
	}

	public KjCity(String id){
		super(id);
	}

	@Length(min=0, max=255, message="城市名长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getZindex() {
		return zindex;
	}

	public void setZindex(int zindex) {
		this.zindex = zindex;
	}
}
